﻿<Window x:Class="RemoteCommands.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:res="clr-namespace:RemoteCommands.Properties"
        Title="MainWindow" Height="195" Width="390">
    <Window.Resources>
        <Thickness x:Key="SmallMargin">10 10 0 0</Thickness>

        <Style TargetType="Button">
            <Setter Property="Height" Value="23"/>
            <Setter Property="Width" Value="80"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
        </Style>
        <Style TargetType="Label">
            <Setter Property="Padding" Value="0" />
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="FontSize" Value="22"/>
        </Style>

        <Style TargetType="RowDefinition">
            <Setter Property="Height" Value="30"/>
        </Style>

    </Window.Resources>
    <ScrollViewer VerticalScrollBarVisibility="Auto">
        <StackPanel >
            <Grid Height="120" Margin="5 0 0 10">
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="100"/>
                </Grid.ColumnDefinitions>

                <CheckBox  Content="{x:Static res:Resources.EnableAutoCheck}" VerticalAlignment="Center" 
                  IsChecked="{Binding AutoCheckEnabled}"/>

                <Label Grid.Column="2" Content="{Binding Path=CheckTime}" Height="30"/>

                <Button Grid.Row="1" Content="{x:Static res:Resources.CheckNow}"
                HorizontalAlignment="Center" Command="{Binding Path=Commands[Check]}" />

                <CheckBox Grid.Row="2"   Content="{x:Static res:Resources.EnableAutoSuspend}" VerticalAlignment="Center"
                  IsChecked="{Binding SuspendEnabled}"/>

                <Label Grid.Row="2" Grid.Column="2" Content="{Binding Path=SuspendTime}" Height="30"
                       ToolTip="{x:Static res:Resources.SuspendTimeTooltip}"/>
                <Label Grid.Row="3" Grid.Column="2" Content="{Binding Path=WakeUpTime}" Height="30" 
                       ToolTip="{x:Static res:Resources.WakeUpTimeTooltip}"/>

                <Button  Grid.Row="3" Content="{x:Static res:Resources.SuspendNow}"
                HorizontalAlignment="Center" Command="{Binding Path=Commands[Suspend]}" DataContext="{Binding}" />

            </Grid>

            <Expander Header="{x:Static res:Resources.ExecuteCommand}" >
                <StackPanel>
                    <TextBox Text="{Binding CommandString}" Height="60" HorizontalAlignment="Left" 
                    TextWrapping="Wrap" AcceptsReturn="True"
                    Name="textBox1" VerticalAlignment="Top" Width="346" />

                    <Button Content="{x:Static res:Resources.ExecuteCommand}" Width="110" Margin="5"
                Command="{Binding Path=Commands[Execute]}" />
                </StackPanel>
            </Expander>
        </StackPanel>
    </ScrollViewer>
</Window>
